Skip to content

Permit n-argument operators #127

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 111 commits into
base: master
Choose a base branch
from
Open

Permit n-argument operators #127

wants to merge 111 commits into from

Conversation

MilesCranmer
Copy link
Member

@MilesCranmer MilesCranmer commented May 10, 2025

This opens up DynamicExpressions.jl to D-degree nodes via an additional type parameters. This is still a work-in-progress, but I wanted to track the TODO's here.

TODO:

  • Write upgrade guide in CHANGELOG.md
  • Tests
    • Test string paths
    • Random expression evals for arbitrary arity, compare against Julia evaluation
    • 100% diff coverage (improved coverage; but not 100)
  • Performance
    • Evaluation performance (seems to be roughly the same now)
    • Allocation performance (at the moment, it seems to result in double the # of allocations, and 33% greater memory usage)
    • Either split types, or get generic type to match existing performance for
    • Consider using ::Union{Nothing,N} rather than Ref
    • Profile SymbolicRegression.jl against the diff.
      • Need to get DynamicDiff.jl working first.
  • Feature coverage
    • Generic operator enum compatibility
    • Derivative compatibility
    • Preallocation compatibility
    • LoopVectorization.jl compat
    • Bumper.jl compat
    • Verify graph node compat
    • Verify simplification compat
  • Cleaning
    • Simplify evaluation code with generic Base.Cartesian version
    • Manually verify no internal uses of .l and .r (temporarily set these to be errors)
    • Introduce alias Node{T} = NNode{T,2} for full backwards compatibility

@MilesCranmer MilesCranmer changed the base branch from n-arity to master May 10, 2025 13:11
@coveralls
Copy link

coveralls commented May 10, 2025

Pull Request Test Coverage Report for Build 15535623853

Details

  • 746 of 768 (97.14%) changed or added relevant lines in 22 files are covered.
  • 2 unchanged lines in 2 files lost coverage.
  • Overall coverage increased (+0.3%) to 95.867%

Changes Missing Coverage Covered Lines Changed/Added Lines %
src/Node.jl 100 101 99.01%
src/base.jl 58 59 98.31%
src/Evaluate.jl 155 164 94.51%
src/EvaluateDerivative.jl 58 69 84.06%
Files with Coverage Reduction New Missed Lines %
src/EvaluateDerivative.jl 1 84.44%
src/ExtensionInterface.jl 1 92.86%
Totals Coverage Status
Change from base Build 15258002007: 0.3%
Covered Lines: 2598
Relevant Lines: 2710

💛 - Coveralls

This comment was marked as outdated.

@MilesCranmer MilesCranmer force-pushed the n-arity-v4 branch 4 times, most recently from 09cd0fa to d6f967a Compare June 9, 2025 05:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants